import React, { Component } from 'react';
import {
	Alert, StyleSheet, Text, View, TouchableOpacity,
	PixelRatio, Image, ScrollView, Animated
} from "react-native";
import { API, API_GENERATE } from '../../../config/api';
import MethodUtil from '../../../utils/MethodUtil';
import StorageHelper from '../../../utils/storageHelper'
import { GLOBAL } from '../../../config/global';
import { style } from '../../../theme/style';
import { CREDIT_TYPES, GET_PAGE } from '../../../config/definition';
import { Common } from '../../../component/common/Common.js';
import { SpaceBetween } from '../create/_components/SpaceBetween.js';
import { MorePage } from '../create/_components/MorePage.js';
import { PlayListPage } from '../create/_components/PlayListPage.js';
import { StateLightBox, LightBox, ReceiveLightBox, PriceLightBox } from '../../../component/Store';
import { PageStatusIndex } from '../../../component/page-status/PageStatusIndex';
import HTTP from '../../../utils/http';
import ToastUtil from '../../../utils/toast';
import { CURRENCY } from '../../../utils/helper';
import { STORAGE_CONSTANT } from '../../../config/storage';

const scale = GLOBAL.SCALE;
const arrowGray = require('../../../imgs/store/arrowGray.png');//销
export class BackDetailPage extends Component {
	static navigationOptions = ({ navigation, navigationOptions }) => {
		const { params } = navigation.state;
		return {
			headerTitle: '闭口销售成交报告详情',
			headerTintColor: style.color.white,
			headerLeft: <Common type="headLeft" onPress={() => { navigation.goBack() }} color='#fff' />,
			//headerRight: (<Image style={style.head.headRightEmpty} source={require('../../../imgs/goBackEmpty.png')} />),
			headerRight: (
				params.status && (params.status == 'RPT_AUDIT_UNPASS') ? <TouchableOpacity onPress={() => navigation.navigate(GET_PAGE('OrderBaseInfoPage'), params.item)}>
					<Text style={{ fontSize: 14 * scale, marginRight: 12 * scale, color: '#fff' }}>编辑</Text>
				</TouchableOpacity> : null
			),
			headerStyle: style.head.headerStyle,
			headerTitleStyle: {
				flex: 1,
				textAlign: 'center'
			}
		}
	};
	requesting;
	constructor(props) {
		super(props);
		this.orderId = props.navigation.state.params.orderId;
		this.orderType = props.navigation.state.params.orderType;
		//this.businessKey = props.navigation.state.params.businessKey;
		//this.taskId = props.navigation.state.params.taskId;
		//this.formKey = props.navigation.state.params.formKey


		this.animateData = {
			basic: {
				start: {   // 初始值
					value: 100 * scale,
					text: '展开更多'
				},
				end: {  // 介素值
					value: 320,
					text: '收起'
				}
			},
			sale: {
				start: {   // 初始值
					value: 100 * scale,
					text: '展开更多'
				},
				end: {  // 介素值
					value: 320,
					text: '收起'
				}
			},
		}

		this.state = {
			data: {},
			basicAnim: new Animated.Value(this.animateData.basic.start.value),
			saleAnim: new Animated.Value(this.animateData.sale.start.value),
			basicOnoff: true,
			saleOnoff: true,
			resultModalVisible: false,
			loaded: false,
			lightBoxVisible: false,
			stateLightBoxData: false,
			receiveLightBoxData: false,
			priceBoxVisible: false,
			oneText: '',
			twoText: '',
			threeText: '',
			fourText: '',
			oneImg: false,
			twoImg: false,
			threeImg: false,
			fourImg: false,
			oneColor: false,
			twoColor: false,
			threeColor: false,
			fourColor: false,
			isRevoke: false,//是否可撤销本单
			isImplement: false,//订单执行进度条是否显示
		}
		this._closeLightBox = this._closeLightBox.bind(this);
		this.stateLightBoxData = {
			onClosePress: this._closeLightBox,
			modalVisible: false,
			title: '',
			rowDataList: [],
		};
		this.lightBoxData = {
			onClosePress: this._closeLightBox,
			modalVisible: false,
			title: '',
			rowDataList: [],
		};
		this.receiveLightBoxData = {
			onClosePress: this._closeLightBox,
			modalVisible: false,
			title: '',
			rowDataList: [],
		};
		this.priceBoxData = {
			onClosePress: this._closeLightBox,
			modalVisible: false,
			title: '',
			rowDataList: [],
		};
	}

	componentWillMount () {
		this._getListData();
		this._resultId();// 获取个人信息(id)
	}

	//添加个人信息
	_resultId = async () => {
		let userInfo = await StorageHelper.get(STORAGE_CONSTANT.USER_INFO_KEY);
		if (userInfo) {
			userInfo = JSON.parse(userInfo);
			this.userId = userInfo.userId;
		}
	}

	//初始化详情数据
	async _getListData () {
		this.setState({
			loaded: true
		})

		let responseData = await HTTP.POST(API_GENERATE(API.ORDER_DETAIL), {
			orderId: this.orderId,
			queryType: 'ORDER_ALL_INFO',
		});
		this.setState({
			loaded: false
		});
		if (responseData) {
			let { status } = responseData;
			this.props.navigation.setParams({ status: status });
			this.props.navigation.setParams({ item: responseData });
			this.setState({
				data: responseData
			}, function () {
				this._getNodeData(responseData['status']);
			});
		}
	}

	//根据订单状态来显示节点信息
	async _getNodeData (status) {
		/*
		RPT_DRAFT   成交报告草稿
		RPT_AUDITING  成交报告审批中
		RPT_ADUIT_UNPASS  成交报告审批驳回
		RPT_ADUIT_PASS  成交报告审批通过
		WAIT_CONFIRM    待业务员确认
		WAIT_AUDIT 待审核
		WAIT_SIGN  待签章
		SINGLE_SIGNED 一方已签章
		DOUBLE_SIGNED 双方已签章
		EXECUTING 执行中
		COMPLETED 订单完成
		ABANDONED 废弃
		COLL_GO  收货完成
		DLVR_GO  发货完成
		*/
		if ("AUDIT_UNPASS" == status) {
			this.setState({
				isRevoke: true,//可撤回
				isImplement: false,//执行进度条不显示
			});
		}
		if ("RPT_DRAFT" === status) {
			//成交报告草稿
			this.setState({
				oneText: '待提交',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: false,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				isRevoke: false,//可撤回
				isImplement: false,//执行进度条不显示
			});
		} else if ("RPT_AUDITING" === status) {
			//成交报告审批中
			this.setState({
				oneText: '审批中',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: false,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				isRevoke: true,//可撤回
				isImplement: false,//执行进度条不显示
			});
		} else if ("RPT_AUDIT_UNPASS" === status) {
			//成交报告审批驳回
			this.setState({
				oneText: '已驳回',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: false,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				isRevoke: true,//可撤回
				isImplement: false,//执行进度条不显示
			});
		} else if ("RPT_AUDIT_PASS" === status) {
			//成交报告审批通过
			this.setState({
				oneText: '已通过',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: true,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				isRevoke: true,//可撤回
				isImplement: true,//执行进度条不显示
			});
		} else if ("WAIT_CONFIRM" === status) {
			//待业务员确认
			this.setState({
				oneText: '已通过',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: true,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				isRevoke: true,//可撤回
				isImplement: true,//执行进度条不显示
			});
		} else if ("WAIT_AUDIT" === status) {
			//待审核
			this.setState({
				oneText: '已通过',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: true,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				isRevoke: true,//可撤回
				isImplement: true,//执行进度条不显示
			});
		} else if ("WAIT_SIGN" === status) {
			//待签章
			this.setState({
				oneText: '已通过',
				twoText: '双签中',
				threeText: '',
				fourText: '',
				oneImg: true,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: true,
				twoColor: false,
				threeColor: false,
				isRevoke: true,//可撤回
				isImplement: true,//执行进度条不显示
			});
		} else if ("SINGLE_SIGNED" === status) {
			//一方已签章
			this.setState({
				oneText: '已通过',
				twoText: '双签中',
				threeText: '',
				fourText: '',
				oneImg: true,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: true,
				twoColor: false,
				threeColor: false,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		} else if ("DOUBLE_SIGNED" === status) {
			//双方已签章
			this.setState({
				oneText: '已通过',
				twoText: '已双签',
				threeText: '',
				fourText: '',
				oneImg: true,
				twoImg: true,
				threeImg: false,
				fourImg: false,
				oneColor: true,
				twoColor: false,
				threeColor: false,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		}
		else if ("EXECUTING" === status) {
			//执行中
			this.setState({
				oneText: '已通过',
				twoText: '已双签',
				threeText: '执行中',
				fourText: '',
				oneImg: true,
				twoImg: true,
				threeImg: true,
				fourImg: false,
				oneColor: true,
				twoColor: true,
				threeColor: false,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		}
		else if ("COMPLETED" === status) {
			//订单完成
			this.setState({
				oneText: '已通过',
				twoText: '已双签',
				threeText: '执行完成',
				fourText: '已完成',
				oneImg: true,
				twoImg: true,
				threeImg: true,
				fourImg: true,
				oneColor: true,
				twoColor: true,
				threeColor: true,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		}
		else if ("ABANDONED" === status) {
			//废弃
			this.setState({
				oneText: '已废弃',
				twoText: '',
				threeText: '',
				fourText: '',
				oneImg: false,
				twoImg: false,
				threeImg: false,
				fourImg: false,
				oneColor: false,
				twoColor: false,
				threeColor: false,
				fourColor: false,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		}
		else if ("COLL_GD" === status) {
			//收货完成
			this.setState({
				oneText: '已通过',
				twoText: '已双签',
				threeText: '执行中',
				fourText: '',
				oneImg: true,
				twoImg: true,
				threeImg: true,
				fourImg: false,
				oneColor: true,
				twoColor: true,
				threeColor: false,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		} else if ("DLVR_GD" === status) {
			//发货完成
			this.setState({
				oneText: '已通过',
				twoText: '已双签',
				threeText: '执行中',
				fourText: '',
				oneImg: true,
				twoImg: true,
				threeImg: true,
				fourImg: false,
				oneColor: true,
				twoColor: true,
				threeColor: false,
				isRevoke: false,//可撤回
				isImplement: true,//执行进度条不显示
			});
		}
	}



	// animatedFn
	_animatedFn = (num, animateObj) => {
		Animated.timing(
			animateObj,
			{
				duration: 300,
				toValue: num
			}
		).start();
	}

	// 基本信息  更多设置
	_onPressFn = (data, objOnoff, name, animateObj) => {
		if (objOnoff) {
			this._animatedFn(data.end.value, animateObj);
		} else {
			this._animatedFn(data.start.value, animateObj);
		}
		if (name == 'basicOnoff') {
			this.setState({
				basicOnoff: !objOnoff
			})
		} else if (name == 'saleOnoff') {
			this.setState({
				saleOnoff: !objOnoff
			})
		}

	}

	_closeLightBox () {
		this.lightBoxData.modalVisible = false;
		this.stateLightBoxData.modalVisible = false;
		this.receiveLightBoxData.modalVisible = false;
		this.priceBoxData.modalVisible = false;
		const { priceBoxVisible, lightBoxVisible, stateLightBoxData, receiveLightBoxData } = this.state;
		this.setState({
			lightBoxVisible: !lightBoxVisible,
			stateLightBoxData: !stateLightBoxData,
			receiveLightBoxData: !receiveLightBoxData,
			priceBoxVisible: !priceBoxVisible,
		});
	}
	//预算估计费用
	_didPressShowBudgetLightBox (currency, orderFeeVOS) {
		this.lightBoxData.modalVisible = true;
		this.lightBoxData.title = '费用估算';
		this.lightBoxData.rowDataList = orderFeeVOS.map((item, index) => {
			return { label: item.feeTypeName + '：', val: CURRENCY.getUnit(currency).label + MethodUtil.toThousands((item.feeAmt || 0), 2) + CURRENCY.getUnit(currency).text }
		});
		const { lightBoxVisible } = this.state;
		this.setState({
			lightBoxVisible: !lightBoxVisible
		});
	}

	//审批节点
	async	_didPressShowStateLightBox (orderId, processInstanceId) {


		//查询审批节点
		let responseData1 = await HTTP.GET(API_GENERATE(API.APPROVAL_NODE) + '?bizId=' + this.orderId + '&bizObjType=1&processInstanceId=' + processInstanceId);
		if (!responseData1.length) return;
		/* this.setState({
			loaded: true
		});
		this.setState({
			loaded: false
		}); */

		this.stateLightBoxData.modalVisible = true;
		this.stateLightBoxData.title = '审批状态';
		this.stateLightBoxData.rowDataList = responseData1.map((item, index) => {
			return {
				taskName: item.taskName,// + '(' + item.auditStaffName + ')',//auditStaffName
				auditTime: item.auditTime,
				auditResult: item.auditResult,
				remark: item.remark,
				auditStaffName: item.auditStaffName,
				logId: item.logId,
			};
		})

		const { stateLightBoxVisible } = this.state;
		this.setState({
			stateLightBoxVisible: !stateLightBoxVisible
		});
	}

	//物流信息
	async	_didPressShowReceiveLightBox (outItem, name, item) {
		let outData = [];
		outItem.map((inItem, i) => {
			outData[i] = { time: inItem.settleBasisDate ? inItem.settleBasisDate.split(' ')[0] : inItem.createTime.split(' ')[0], fahuo: inItem.sendQuantity || 0, shouhuo: inItem.signQuantity || 0 };
		})
		this.setState({
			loaded: true
		});
		let responseData1 = [{
			name: item.goodsName, weight: item.quantity, weightName: '吨',
			data: outData
		}];
		this.receiveLightBoxData.modalVisible = true;
		this.receiveLightBoxData.title = name;
		this.receiveLightBoxData.rowDataList = responseData1;
		const { receiveLightBoxData } = this.state;
		this.setState({
			receiveLightBoxData: !receiveLightBoxData
		});
	}

	//批次关联
	async _didPressShowOppoOrderLightBox (data) {
		const { orderTypeName, orderId, itemId } = data;
		let goodsName = '';
		let price = '';
		this.setState({
			loaded: true
		});

		let responseData1 = await HTTP.POST(API_GENERATE(API.ORDER_DETAIL), {
			orderId,
			itemId,
			queryType: 'ORDER_ALL_INFO',
		});

		this.setState({
			loaded: false
		});
		if (responseData1) {
			if (responseData1.orderItemList && responseData1.orderItemList.length > 0) {
				responseData1.orderItemList.map((item, index) => {
					goodsName += (index === 0 ? '' : ',') + item.goodsName;
					price = item.price;
				})
			}
		}
		this.lightBoxData.rowDataList = [];
		this.lightBoxData.modalVisible = true;
		this.lightBoxData.title = orderTypeName + '成交报告';
		this.lightBoxData.rowDataList.push({ label: '成交编号：', val: responseData1.orderId });
		this.lightBoxData.rowDataList.push({ label: '客户名称：', val: responseData1.companyName });
		// this.lightBoxData.rowDataList.push({ label: '企业类型：', val: responseData1.feeAmt });
		this.lightBoxData.rowDataList.push({ label: '付款类型：', val: responseData1.payTypeName });
		this.lightBoxData.rowDataList.push({ label: '付款方式：', val: responseData1.payStyleName });
		if (responseData1.payExpireDays) {
			this.lightBoxData.rowDataList.push({ label: '付款期限：', val: this.getPayTypeName(responseData1.payType) + responseData1.payExpireDays + '天内付款' })
		};
		if (responseData1.deliveryExpireDays) {
			this.lightBoxData.rowDataList.push({ label: '交货期限：', val: '付款' + responseData1.deliveryExpireDays + '天内发货' })
		};
		//this.lightBoxData.rowDataList.push({ label: '付款期限：', val: '签订' + responseData1.payExpireDays + '天内付款' });
		this.lightBoxData.rowDataList.push({ label: '商品名称：', val: goodsName });
		// this.lightBoxData.rowDataList.push({ label: '数量：', val: responseData1.feeAmt });
		this.lightBoxData.rowDataList.push({ label: '交货方式：', val: responseData1.orderType == 'P' ? responseData1.purchaseDeliveryTypeName : responseData1.saleDeliveryTypeName });
		// this.lightBoxData.rowDataList.push({ label: '交货计划：', val: responseData1.feeAmt });
		// this.lightBoxData.rowDataList.push({ label: '单笔数量：', val: responseData1.feeAmt });
		// this.lightBoxData.rowDataList.push({ label: '关联数量：', val: responseData1.feeAmt });
		this.lightBoxData.rowDataList.push({ label: '价格：', val: responseData1.orderItemList && responseData1.orderItemList.length > 0 ? MethodUtil.toThousands(responseData1.orderItemList[0].price, 2) : MethodUtil.toThousands(0) });

		const { lightBoxVisible } = this.state;
		this.setState({
			lightBoxVisible: !lightBoxVisible
		});
	}


	//资金详情
	async _didPressShowPriceLightBox (currency, orderType, orderItemList, payReceiptAmount) {
		let rightStyle = { width: 150 * scale, textAlign: 'right', fontSize: 13 * scale, };
		let leftStyle = { marginLeft: 12 * scale, color: '#000', width: 120 * scale, }
		let viewStyle = { marginTop: 8 * scale, };
		this.priceBoxData.rowDataList = [];
		this.priceBoxData.modalVisible = true;
		this.priceBoxData.title = orderType === 'P' ? '已付金额' : '已收金额';
		let countAmount = 0;
		orderItemList.map((item, index) => {
			//amount
			//goodsName
			countAmount += (item.amount || 0)
			this.priceBoxData.rowDataList.push({ label: item.goodsName, val: '总金额' + CURRENCY.getUnit(currency).label + MethodUtil.toThousands(item.amount || 0, 2) + CURRENCY.getUnit(currency).text, leftStyle: leftStyle, rightStyle: rightStyle, viewStyle: viewStyle });
		})
		this.priceBoxData.rowDataList.push({ label: '合同总金额', val: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(countAmount, 2), leftStyle: leftStyle, rightStyle: rightStyle, viewStyle: viewStyle });
		this.priceBoxData.rowDataList.push({ label: orderType === 'P' ? '已付款' : '已收款', val: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(payReceiptAmount, 2) + CURRENCY.getUnit(currency).text, leftStyle: leftStyle, rightStyle: rightStyle, viewStyle: viewStyle });
		const { priceBoxVisible } = this.state;
		this.setState({
			priceBoxVisible: !priceBoxVisible
		});
	}

	async _fetchApproval (orderId) {
		if (this.requesting) return;
		this.setState({
			refuseModalVisible: false,
			loaded: true
		});
		this.requesting = true;
		const responseData = await HTTP.POST(API_GENERATE(API.ORDER_REVOKE), {
			//businessKey: this.businessKey,
			businessKey: orderId
		});

		this.setState({
			loaded: false
		});

		if (responseData) {
			ToastUtil.showSuccess('撤销本单成功').then(() => {
				this._goBack();
			})
		} else {
			this.requesting = false;
		}
	}

	// 返回上一个页面
	_goBack = () => {
		setTimeout(() => {
			this.requesting = false;
		}, 1000)
		this.props.navigation.state.params.callBack && this.props.navigation.state.params.callBack();
		this.props.navigation.goBack();
	}

	getPayTypeName (payType) {
		if ('3' === payType) {
			return '货到';
		}
		else if ('4' === payType) {
			return '签订';
		}
		else if ('5' === payType) {
			return '票到';
		} else {
			return '签订';
		}
	}

	render () {
		let { isRevoke, isImplement, data, basicOnoff, basicAnim, saleOnoff, saleAnim, oneText,
			twoText, threeText, fourText, oneImg, twoImg, threeImg, fourImg, oneColor, twoColor, threeColor, priceShow } = this.state;
		//供应商、成交编号、付款类型、付款方式、付款期限
		let { priceType, deliveryType, orderCapitalSummary, statusName, orderId,
			orderItemList, orderFeeList, otherCost, currency, orderDeliveryPlanList, orderType, contractInfo, oppoOrderInfo, processInstanceId, transportTypeName, logisticsPrice, srcAddress, destAddress, bizStaffId } = data;
		const statusOff = require('../../../imgs/apply/statusOff.png');//销
		const statusOn = require('../../../imgs/apply/statusOn.png');//销
		let baseCss = basicOnoff ? { height: basicAnim } : null;
		let saleCss = saleOnoff ? { height: saleAnim } : null;
		//let { fontLeft, fontRight } = this.props;
		oppoOrderInfo = oppoOrderInfo ? oppoOrderInfo : '';
		saleInfo = (orderType === 'P' ? oppoOrderInfo : data);//销售订单基本信息
		purchaseInfo = (orderType === 'P' ? data : oppoOrderInfo);//采购订单基本信息

		return (
			<View style={styles.container}>
				<View style={styles.emptyBg}>
				</View>
				<ScrollView style={{ paddingTop: 10 * scale }}>
					{isImplement ? <View style={{ height: 54 * scale, marginBottom: 13 * scale }}>
						<View style={styles.topView}>
							<Image source={oneImg ? statusOn : statusOff} style={styles.topImage}></Image>
							<View style={[styles.topLine, oneColor ? styles.onColor : styles.offColor]}></View>
							<Image source={twoImg ? statusOn : statusOff} style={styles.topImage}></Image>
							<View style={[styles.topLine, twoColor ? styles.onColor : styles.offColor]}></View>
							<Image source={threeImg ? statusOn : statusOff} style={styles.topImage}></Image>
							<View style={[styles.topLine, threeColor ? styles.onColor : styles.offColor]}></View>
							<Image source={fourImg ? statusOn : statusOff} style={styles.topImage}></Image>
						</View>

						<View style={[styles.bottomView]}>
							<View style={[styles.textView]}>
								<Text style={[styles.btextTop]}>{oneText}</Text>
							</View>
							<View style={[styles.textView]}>
								<Text style={[styles.btextTop]}>{twoText}</Text>
							</View>
							<View style={[styles.textView]}>
								<Text style={[styles.btextTop]}>{threeText}</Text>
							</View>
							<View style={[styles.textView]}>
								<Text style={[styles.btextTop]}>{fourText}</Text>
							</View>
						</View>
					</View>
						: null}
					{orderCapitalSummary ? <View style={[styles.itemBox, styles.borders]}>
						<TouchableOpacity onPress={() => { this._didPressShowPriceLightBox(currency, orderType, orderItemList, orderCapitalSummary.payReceiptAmount || 0) }} activeOpacity={1}>
							<View style={{ flexDirection: 'row' }}>
								<Text style={[styles.itemTitle, { width: 345 * scale }]}>付款记录</Text>
								<Image style={[{ width: 6 * scale, height: 11 * scale, marginTop: 17 * scale }]} source={arrowGray}></Image>
							</View>
							<SpaceBetween fontLeft={{ title: '合同总金额' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(orderCapitalSummary.orderAmount || 0, 2) + CURRENCY.getUnit(currency).text }} />
							<SpaceBetween fontLeft={{ title: orderType === 'P' ? '已付款' : '已收款' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(orderCapitalSummary.payReceiptAmount || 0, 2) + CURRENCY.getUnit(currency).text }} />
						</TouchableOpacity>
					</View> : null}
					{contractInfo ? <View style={[styles.itemBox, styles.borders]}>
						<Text style={styles.itemTitle}>双签合同</Text>
						<TouchableOpacity onPress={() => {
							const { finalFileId } = contractInfo;
							this.props.navigation.navigate('ContractPdfPage', {
								finalFileId
							});
						}}><SpaceBetween fontLeft={{ title: '合同信息' }} fontRight={{ title: '合同信息.pdf' }} iconShow={true} /></TouchableOpacity>
					</View> : null}

					<View style={[styles.itemBox, { overflow: 'hidden' }]}>
						<Animated.View style={[baseCss, styles.animateBg]}>
							<Text style={styles.itemTitle}>{'基本信息(采购成交)'}</Text>
							<SpaceBetween fontLeft={{ title: '订单编号' }} fontRight={{ title: purchaseInfo.orderId }} />
							<SpaceBetween fontLeft={{ title: '供应商' }} fontRight={{ title: purchaseInfo.companyName }} />
							<SpaceBetween fontLeft={{ title: '业务类型' }} fontRight={{ title: purchaseInfo.isUniteName || '-' }} />
							<SpaceBetween fontLeft={{ title: '付款类型' }} fontRight={{ title: purchaseInfo.payTypeName }} />
							{CREDIT_TYPES[purchaseInfo.orderType] && CREDIT_TYPES[purchaseInfo.orderType][purchaseInfo.payType] ?
								<View>
									<Text style={styles.credit}>
										授信额度 ￥{purchaseInfo.creditInfo && MethodUtil.toThousands(purchaseInfo.creditInfo.creditAmount, 2) + CURRENCY.getUnit(currency).text}  申请总占用 ￥{purchaseInfo.creditInfo && MethodUtil.toThousands(purchaseInfo.creditInfo.usedAmount, 2) + CURRENCY.getUnit(currency).text}  剩余可申请 ￥{purchaseInfo.creditInfo && MethodUtil.toThousands(purchaseInfo.creditInfo.limitAmount, 2) + CURRENCY.getUnit(currency).text}  有效期至 {purchaseInfo.creditInfo && purchaseInfo.creditInfo.creditEndDate}
									</Text>
								</View> : null}
							{purchaseInfo.prepayRate ? <SpaceBetween fontLeft={{ title: '定金比例' }} fontRight={{ title: purchaseInfo.prepayRate + '%' }} /> : null}
							{purchaseInfo.payExpireDays ? <SpaceBetween fontLeft={{ title: this.getPayTypeName(purchaseInfo.payType) }} fontRight={{ title: purchaseInfo.payExpireDays + '天内付款' }} /> : null}
							{purchaseInfo.deliveryExpireDays ? <SpaceBetween fontLeft={{ title: '款到' }} fontRight={{ title: purchaseInfo.deliveryExpireDays + '天内交货' }} /> : null}
							<SpaceBetween fontLeft={{ title: '付款方式' }} fontRight={{ title: purchaseInfo.payStyleName }} />
							{/*<SpaceBetween fontLeft={{ title: '有效合同起始日期' }} fontRight={{ title: purchaseInfo.exeBeginDate + '至' + purchaseInfo.exeEndDate }} />*/}
							<SpaceBetween fontLeft={{ title: '币种' }} fontRight={{ title: purchaseInfo.currencyName || '人民币' }} />
							{purchaseInfo.baseDateSettleName ? <SpaceBetween fontLeft={{ title: '结算基准日期' }} fontRight={{ title: purchaseInfo.baseDateSettleName }} /> : null}
							<SpaceBetween fontLeft={{ title: '交货方式' }} fontRight={{ title: purchaseInfo.purchaseDeliveryTypeName }} />

							{srcAddress && srcAddress != '' ? <SpaceBetween fontLeft={{ title: '出库地' }} fontRight={{ title: srcAddress }} /> : null}
							{destAddress && destAddress != '' ? <SpaceBetween fontLeft={{ title: '目的地' }} fontRight={{ title: destAddress }} /> : null}
							{logisticsPrice && logisticsPrice && 'U' != logisticsPrice ? <SpaceBetween fontLeft={{ title: '运输单价' }} fontRight={{ title: MethodUtil.toThousands(logisticsPrice || 0, 2) + CURRENCY.getUnit(currency).text + '/吨' }} /> : null}
							{transportTypeName && transportTypeName && 'U' != transportTypeName ? <SpaceBetween fontLeft={{ title: '运输方式' }} fontRight={{ title: transportTypeName }} /> : null}

							{purchaseInfo.lostRenderName && purchaseInfo.deliveryType && 'U' != purchaseInfo.deliveryType ? <SpaceBetween fontLeft={{ title: '运损承担方' }} fontRight={{ title: purchaseInfo.lostRenderName }} /> : null}
							{purchaseInfo.lostRate ? <SpaceBetween fontLeft={{ title: '途损率' }} fontRight={{ title: '千分之' + MethodUtil.countObj.multiply(purchaseInfo.lostRate, 1000) }} /> : null}
							{purchaseInfo.freeDays ? <SpaceBetween fontLeft={{ title: '免仓期' }} fontRight={{ title: purchaseInfo.freeDays }} /> : null}
							{purchaseInfo.companyContactorName ? <SpaceBetween fontLeft={{ title: '对方企业业务员' }} fontRight={{ title: purchaseInfo.companyContactorName }} /> : null}
							{purchaseInfo.settleDisputesName ? <SpaceBetween fontLeft={{ title: '争议处理方式' }} fontRight={{ title: purchaseInfo.settleDisputesName }} /> : null}
						</Animated.View>
						<MorePage text={basicOnoff ? this.animateData.basic.start.text : this.animateData.basic.end.text} onPressFn={() => { this._onPressFn(this.animateData.basic, basicOnoff, 'basicOnoff', basicAnim) }} />
					</View>

					<View style={[styles.itemBox, styles.borders, { overflow: 'hidden' }]}>
						<Animated.View style={[saleCss, styles.animateBg]}>
							<Text style={styles.itemTitle}>{'基本信息(销售成交)'}</Text>
							<SpaceBetween fontLeft={{ title: '订单编号' }} fontRight={{ title: saleInfo.orderId }} />
							<SpaceBetween fontLeft={{ title: '客户' }} fontRight={{ title: saleInfo.companyName }} />
							<SpaceBetween fontLeft={{ title: '业务类型' }} fontRight={{ title: saleInfo.isUniteName || '-' }} />
							<SpaceBetween fontLeft={{ title: '收款类型' }} fontRight={{ title: saleInfo.payTypeName }} />
							{CREDIT_TYPES[saleInfo.orderType] && CREDIT_TYPES[saleInfo.orderType][saleInfo.payType] ?
								<View>
									<Text style={styles.credit}>
										授信额度 ￥{saleInfo.creditInfo && MethodUtil.toThousands(saleInfo.creditInfo.creditAmount, 2) + CURRENCY.getUnit(currency).text}  申请总占用 ￥{saleInfo.creditInfo && MethodUtil.toThousands(saleInfo.creditInfo.usedAmount, 2) + CURRENCY.getUnit(currency).text}  剩余可申请 ￥{saleInfo.creditInfo && MethodUtil.toThousands(saleInfo.creditInfo.limitAmount, 2) + CURRENCY.getUnit(currency).text}  有效期至 {saleInfo.creditInfo && saleInfo.creditInfo.creditEndDate}
									</Text>
								</View> : null}
							{saleInfo.prepayRate ? <SpaceBetween fontLeft={{ title: '定金比例' }} fontRight={{ title: saleInfo.prepayRate + '%' }} /> : null}
							{saleInfo.payExpireDays ? <SpaceBetween fontLeft={{ title: this.getPayTypeName(saleInfo.payType) }} fontRight={{ title: saleInfo.payExpireDays + '天内付款' }} /> : null}
							{saleInfo.deliveryExpireDays ? <SpaceBetween fontLeft={{ title: '款到' }} fontRight={{ title: saleInfo.deliveryExpireDays + '天内交货' }} /> : null}
							<SpaceBetween fontLeft={{ title: '付款方式' }} fontRight={{ title: saleInfo.payStyleName }} />
							{/*<SpaceBetween fontLeft={{ title: '有效合同起始日期' }} fontRight={{ title: saleInfo.exeBeginDate + '至' + saleInfo.exeEndDate }} />*/}
							<SpaceBetween fontLeft={{ title: '币种' }} fontRight={{ title: saleInfo.currencyName || '人民币' }} />
							{saleInfo.baseDateSettleName ? <SpaceBetween fontLeft={{ title: '结算基准日期' }} fontRight={{ title: saleInfo.baseDateSettleName }} /> : null}
							<SpaceBetween fontLeft={{ title: '交货方式' }} fontRight={{ title: saleInfo.orderType == 'P' ? saleInfo.purchaseDeliveryTypeName : saleInfo.saleDeliveryTypeName }} />


							{srcAddress && srcAddress != '' ? <SpaceBetween fontLeft={{ title: '出库地' }} fontRight={{ title: srcAddress }} /> : null}
							{destAddress && destAddress != '' ? <SpaceBetween fontLeft={{ title: '目的地' }} fontRight={{ title: destAddress }} /> : null}
							{logisticsPrice && logisticsPrice && 'U' != logisticsPrice ? <SpaceBetween fontLeft={{ title: '运输单价' }} fontRight={{ title: MethodUtil.toThousands(logisticsPrice || 0, 2) + CURRENCY.getUnit(currency).text + '/吨' }} /> : null}
							{transportTypeName && transportTypeName && 'U' != transportTypeName ? <SpaceBetween fontLeft={{ title: '运输方式' }} fontRight={{ title: transportTypeName }} /> : null}


							{saleInfo.lostRenderName && saleInfo.deliveryType && 'U' != saleInfo.deliveryType ? <SpaceBetween fontLeft={{ title: '运损承担方' }} fontRight={{ title: saleInfo.lostRenderName }} /> : null}
							{saleInfo.lostRate ? <SpaceBetween fontLeft={{ title: '途损率' }} fontRight={{ title: '千分之' + MethodUtil.countObj.multiply(saleInfo.lostRate, 1000) }} /> : null}
							{saleInfo.freeDays ? <SpaceBetween fontLeft={{ title: '免仓期' }} fontRight={{ title: saleInfo.freeDays }} /> : null}
							{saleInfo.companyContactorName ? <SpaceBetween fontLeft={{ title: '对方企业业务员' }} fontRight={{ title: saleInfo.companyContactorName }} /> : null}
							{saleInfo.settleDisputesName ? <SpaceBetween fontLeft={{ title: '争议处理方式' }} fontRight={{ title: saleInfo.settleDisputesName }} /> : null}
							{saleInfo.remark ? <SpaceBetween fontLeft={{ title: '合同备注' }} fontRight={{ title: saleInfo.remark }} /> : null}
							{saleInfo.auditRemark ? <SpaceBetween fontLeft={{ title: '送审备注' }} fontRight={{ title: saleInfo.auditRemark }} /> : null}
						</Animated.View>
						<MorePage text={saleOnoff ? this.animateData.sale.start.text : this.animateData.sale.end.text} onPressFn={() => { this._onPressFn(this.animateData.sale, saleOnoff, 'saleOnoff', saleAnim) }} />
					</View>
					{
						orderItemList && orderItemList.length > 0 ? (
							orderItemList.map((item, index) => {
								let { inStockItemList, outStockItemList } = item;
								let isStockWeight = 0;
								let outStockWeight = 0;
								if (inStockItemList) {
									inStockItemList.map((inItem, i) => {
										isStockWeight += inItem.signQuantity;//sendQuantity
									})
								}
								if (outStockItemList) {
									outStockItemList.map((outItem, i) => {
										outStockWeight += outItem.sendQuantity;
									})
								}
								let deliveryAddress = [];
								deliveryAddress = item.deliveryAddressList ? item.deliveryAddressList.map((addr, i) => {
									const address = (addr.provinceName || '') + (addr.cityName || '') + (addr.areaName || '') + (addr.addressName ? addr.addressName : (addr.detailAddress || ''));
									return address + (i === (item.deliveryAddressList.length - 1) ? '' : '，');
								}) : [];

								let endAddress = [];
								endAddress = item.endAddressList ? item.endAddressList.map((addj, j) => {
									let addressEnd = (addj.provinceName || '') + (addj.cityName || '') + (addj.areaName || '') + (addj.addressName ? addj.addressName : (addj.detailAddress || ''));
									return addressEnd + (j === (item.endAddressList.length - 1) ? '' : '，');
								}) : [];

								return (
									<View key={index} style={[styles.itemBox, styles.borders]}>
										<View style={[styles.animateBg]}>
											<Text style={styles.itemTitle}>{item.goodsName}</Text>
											<SpaceBetween fontLeft={{ title: '数量' }} fontRight={{ title: item.quantity + item.uomName }} />
											{inStockItemList && inStockItemList.length > 0 ?
												<TouchableOpacity onPress={() => { this._didPressShowReceiveLightBox(inStockItemList, '收货信息', item) }} activeOpacity={1}>
													<SpaceBetween fontLeft={{ title: '收货数量' }} fontRight={{ title: isStockWeight + item.uomName, style: { color: '#2F7BFF' } }} iconShow={true} />
												</TouchableOpacity> : null}
											{outStockItemList && outStockItemList.length > 0 ?
												<TouchableOpacity onPress={() => { this._didPressShowReceiveLightBox(outStockItemList, '发货信息', item) }} activeOpacity={1} >
													<SpaceBetween fontLeft={{ title: '发货数量' }} fontRight={{ title: outStockWeight + item.uomName, style: { color: '#2F7BFF' } }} iconShow={true} />
												</TouchableOpacity>
												: null}
											{/*<View style={styles.infoBlue}>
												<Text style={styles.infoText}>
													总库存：{item.inventoryStandBookVO && item.inventoryStandBookVO.comAvailableQuantity ? item.inventoryStandBookVO.comAvailableQuantity : '0'}{item.uomName}，
													部门库存：{item.inventoryStandBookVO && item.inventoryStandBookVO.orgAvailableQuantity ? item.inventoryStandBookVO.orgAvailableQuantity : '0'}{item.uomName}
												</Text>
												<Text style={styles.infoText}>
													总敞口：{item.inventoryStandBookVO && item.inventoryStandBookVO.comOpenQuantity ? item.inventoryStandBookVO.comOpenQuantity : '0'}{item.uomName}，
													部门敞口：{item.inventoryStandBookVO && item.inventoryStandBookVO.orgOpenQuantity ? item.inventoryStandBookVO.orgOpenQuantity : '0'}{item.uomName}
												</Text>
											</View>*/}
											<SpaceBetween fontLeft={{ title: priceType == '2' ? '暂定价' : '单价' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands((item.oppoOrderItemInfo.price || 0), 2) + CURRENCY.getUnit(currency).text + '/吨' }} />
											{item.oppoOrderItemInfo.priceFormlaId ? <SpaceBetween fontLeft={{ title: '结算价' }} fontRight={{ title: item.oppoOrderItemInfo.priceFormulaDesc }} /> : null}
											{item.oppoOrderItemInfo.udPrice ? <SpaceBetween fontLeft={{ title: '升贴水' }} fontRight={{ title: (item.oppoOrderItemInfo.udPrice >= 0 ? '+' : '') + item.oppoOrderItemInfo.udPrice + CURRENCY.getUnit(currency).text + '/' + item.uomName }} /> : null}
											{/* <View style={styles.newPrice}>
												<View style={styles.newPriceBg}>
													<Text style={styles.priceTitle}>市场价参考：</Text>
													<Text style={styles.price}>4000</Text>
													<Image source={require('../../../../imgs/my-siter/up.png')} style={{ height: 10 * scale, marginLeft: 3 * scale }} />
												</View>
											</View> */}
											<View style={styles.salePrice}>
												<Text style={styles.itemTitle}>价格(销售成交)</Text>
												<SpaceBetween fontLeft={{ title: priceType == '2' ? '暂定价' : '单价' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(item.price || 0, 2) + CURRENCY.getUnit(currency).text + '/吨' }} />
												{item.priceFormlaId ? <SpaceBetween fontLeft={{ title: '结算价' }} fontRight={{ title: item.priceFormulaDesc }} /> : null}
												{item.udPrice ? <SpaceBetween fontLeft={{ title: '升贴水' }} fontRight={{ title: (item.udPrice >= 0 ? '+' : '') + item.udPrice + CURRENCY.getUnit(currency).text + '/' + item.uomName }} /> : null}
											</View>
											{item.ysPercent ? <SpaceBetween fontLeft={{ title: '溢短装比率' }} fontRight={{ title: MethodUtil.countObj.multiply(item.ysPercent, 100) + '%' }} /> : null}

											<View style={styles.totalPrice}>
												<SpaceBetween fontLeft={{ title: '采购总价' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(item.oppoOrderItemInfo.amount, 2) + CURRENCY.getUnit(currency).text, style: { color: style.color.pink } }} />
												<SpaceBetween fontLeft={{ title: '销售总价' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands(item.amount, 2) + CURRENCY.getUnit(currency).text, style: { color: style.color.pink } }} />

											</View>
										</View>
									</View>
								)
							})
						) : null
					}
					{
						orderFeeList && orderFeeList.length ?
							<View style={[styles.itemBox, styles.borders]}>
								<Text style={styles.itemTitle}>费用估算</Text>
								<TouchableOpacity activeOpacity={0.5} onPress={() => { this._didPressShowBudgetLightBox(currency, orderFeeList) }} style={[styles.budget]}>
									<SpaceBetween iconShow={true} fontLeft={{ title: '总价' }} fontRight={{ title: CURRENCY.getUnit(currency).label + MethodUtil.toThousands((otherCost || '0'), 2) + CURRENCY.getUnit(currency).text }} />
								</TouchableOpacity>
							</View> : null
					}
					{
						orderDeliveryPlanList && orderDeliveryPlanList.length > 0 ? (

							<View style={[styles.itemBox, styles.borders]}>
								<Text style={styles.itemTitle}>交货计划(采购成交)</Text>
								{
									orderDeliveryPlanList.map((item, index) => {
										return (
											<PlayListPage key={index} data={{ goodsName: item.goodsName, time: item.deliveryBeginDate + '至' + item.deliveryEndDate, quie: item.quantity }} />
										)
									})
								}
							</View>

						) : null
					}

					{
						orderDeliveryPlanList && orderDeliveryPlanList.length > 0 ? (
							<View style={styles.itemBox}>
								<Text style={styles.itemTitle}>交货计划(销售成交)</Text>
								{
									orderDeliveryPlanList.map((item, index) => {
										return (
											<PlayListPage key={index} data={{ goodsName: item.goodsName, time: item.deliveryBeginDate + '至' + item.deliveryEndDate, quie: item.quantity }} />
										)
									})
								}
							</View>

						) : null
					}
					{isRevoke && bizStaffId == this.userId ?
						<TouchableOpacity style={{ marginBottom: 20 * scale }} onPress={() => {
							Alert.alert('提示', '您确定要撤销本单吗？', [
								{
									text: '取消',
								}, {
									text: '确定',
									onPress: () => {
										this._fetchApproval(orderId);
									}
								}
							]);

						}} refusePress={() => {
							this.setState({
								refuseModalVisible: true
							})
						}}>
							<View style={{ width: 345 * scale, marginLeft: 15 * scale, marginBottom: 9 * scale, height: 44 * scale, borderRadius: 44 * scale, backgroundColor: '#F66464' }}>
								<Text style={{ width: '100%', height: '100%', lineHeight: 44 * scale, textAlign: 'center', fontSize: 18 * scale, color: '#fff' }}>撤销本单</Text>
							</View></TouchableOpacity> : null}
					<StateLightBox  {...this.stateLightBoxData} textStyle={{ marginLeft: 15 * scale, marginRight: 5 * scale }} />
					<LightBox {...this.lightBoxData} />
					<PriceLightBox {...this.priceBoxData} />
					<ReceiveLightBox {...this.receiveLightBoxData} />
				</ScrollView>
				{/*<View style={styles.paiziBox}>
					<Image style={styles.paiziBg} source={require('../../../imgs/apply/topTitle.png')} />
					<View style={styles.paizi}>
						<TouchableOpacity onPress={() => { this._didPressShowStateLightBox(orderId) }} activeOpacity={1}>
							<Text style={styles.topLeft}>{statusName}</Text>
						</TouchableOpacity>
						<Text style={styles.topRight}>{saleInfo.companyName}</Text>
					</View>
					</View>*/}
				<TouchableOpacity style={styles.paiziBox} onPress={() => { this._didPressShowStateLightBox(orderId, processInstanceId) }} activeOpacity={1}>
					<Image style={styles.paiziBg} source={require('../../../imgs/apply/topTitle.png')} />
					<View style={styles.paizi}>
						<Text style={styles.topLeft}>{statusName}</Text>
						<Text style={styles.topRight} numberOfLines={2}>{saleInfo.companyName}</Text>
					</View>
				</TouchableOpacity>
				{
					this.state.loaded ?
						<View style={{ position: 'absolute', height: '100%', width: '100%', top: 0 }}>
							<PageStatusIndex status='loading' />
						</View>
						: null
				}
			</View >
		)
	}
}
const styles = StyleSheet.create({
	container: {
		flex: 1,
		backgroundColor: style.color.white,
	},
	emptyBg: {
		height: 39 * scale,
		backgroundColor: style.color.themeColor,
		marginBottom: 13 * scale,
	},
	paiziBox: {
		width: 351 * scale,  // 726
		height: 60 * scale,
		position: 'absolute',
		left: 12 * scale,
		top: 8 * scale
	},
	paizi: {
		flexDirection: 'row',
		height: 48 * scale,
		justifyContent: 'space-between',
		alignItems: 'center',
		paddingLeft: 15 * scale,
		paddingRight: 15 * scale,
		paddingTop: 10 * scale
	},
	paiziBg: {
		width: 351 * scale,
		position: 'absolute',
	},
	topLeft: {
		fontSize: 14 * scale,
		color: style.color.themeColor,
	},
	topRight: {
		fontSize: 13 * scale,
		color: '#222',
		width: 180 * scale,
		textAlign: 'right'
	},
	itemBox: {
		paddingLeft: 12 * scale,
		paddingRight: 12 * scale,
		marginBottom: 13 * scale
	},
	itemTitle: {
		fontSize: 14 * scale,
		color: style.color.themeColor,
		height: 20 * scale,
		lineHeight: 20 * scale,
		marginTop: 12 * scale,
		marginBottom: 12 * scale
	},
	borders: {
		borderTopWidth: 12 * scale,
		borderStyle: 'solid',
		borderTopColor: style.color.dullGrey,
	},
	infoBlue: {
		width: '100%',
		backgroundColor: style.color.infoBlue,
		borderRadius: 4 * scale,
		paddingTop: 5 * scale,
		paddingBottom: 5 * scale,
		paddingLeft: 8 * scale,
		paddingRight: 8 * scale,
		marginTop: 5 * scale,
		marginBottom: 5 * scale
	},
	infoText: {
		fontSize: 12 * scale,
		color: '#2F7BFF'
	},
	sumPrice: {
		borderTopWidth: 1 / PixelRatio.get(),
		borderStyle: 'solid',
		borderTopColor: style.color.border
	},
	newPrice: {
		/*borderBottomWidth: 1 / PixelRatio.get(),
		borderStyle: 'solid',
		borderBottomColor: style.color.border,*/
		position: 'relative',
		height: 30 * scale
	},
	newPriceBg: {
		height: 24 * scale,
		paddingLeft: 15 * scale,
		paddingRight: 15 * scale,
		flexDirection: 'row',
		justifyContent: 'center',
		alignItems: 'center',
		backgroundColor: '#EDF3FF',
		marginBottom: 15 * scale,
		borderRadius: 12 * scale,
		position: 'absolute',
		top: 0,
		left: 0,
	},
	priceTitle: {
		fontSize: 10 * scale,
		color: '#222',
	},
	price: {
		color: style.color.taps,
		fontSize: 13 * scale
	},
	animateBg: {
		backgroundColor: style.color.white
	}, bgLine: {
		width: '100%',
		height: 12 * scale,
		backgroundColor: style.color.bgGray
	}, topView: {
		marginTop: 15 * scale,
		width: 325 * scale,
		marginLeft: 25 * scale,
		flexDirection: 'row',
	}, topImage: {
		width: 18 * scale,
		height: 18 * scale,
	}, topLine: {
		height: 2 * scale,
		marginTop: 8.5 * scale,
		width: 87.7 * scale,
	}, offColor: {
		backgroundColor: '#EAEAEA'
	}, onColor: {
		backgroundColor: '#2C77F8'
	}, bottomView: {
		flexDirection: 'row',
		marginLeft: 16 * scale,
	}, textView: {
		width: 105.7 * scale,
	}, btextTop: {
		fontSize: 12 * scale,
		color: '#4B4B4B'
	}, btextBottom: {
		fontSize: 12 * scale,
		color: '#000000'
	}, listItemText: {
		flex: 2,
		flexWrap: 'wrap',
		justifyContent: 'space-between',
		padding: 6 * scale
	}, listItem: {
		// height: 30 * scale,
		flexDirection: 'row',
		justifyContent: 'space-between',
		alignItems: 'center'
	}, text: {
		fontSize: 12 * scale,
		color: '#222222'
	}, credit: {
		fontSize: 13 * scale,
		color: '#f86765',
		padding: 4 * scale
	}, totalPrice: {
		borderTopWidth: 1 / PixelRatio.get(),
		borderStyle: 'solid',
		borderBottomColor: '#e4e4e4',
		marginTop: 6 * scale,
		paddingTop: 6 * scale,
	}, salePrice: {
		width: 351 * scale,
		backgroundColor: '#F8F8F8',
		borderRadius: 4 * scale,
		paddingLeft: 12 * scale,
		paddingRight: 12 * scale,
		marginBottom: 16 * scale
	}

})